Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(deps): Update metrics to 0.23. Note: 0.22 was a major change… #189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeckhart
Copy link
Collaborator

… and required some refactor of the metrics

Description

Upgrade to the latest metrics library. There was a relatively significant breaking changes to metrics introduced in metrics 0.22 so this also addresses several of the metrics changes.

Type of change

  • Refactor (non-breaking change that updates existing functionality)

Please delete options that are not relevant.

Test plan (required)

Run all unit and CI tests and get to green.

Additionally, install prometheus and view that the metrics returned are actually working and valid.

Screenshots/Screencaps

Please include a screenshot or screencap that includes any commands that have been added to the generator.

@jeckhart jeckhart requested a review from a team as a code owner August 11, 2024 14:12
@zeeshanlakhani
Copy link
Contributor

@jeckhart thanks for taking this on, was on my agenda for too long.

@zeeshanlakhani
Copy link
Contributor

@jeckhart mind showing just an output of the metrics in action?

@jeckhart
Copy link
Collaborator Author

Metrics output:

# TYPE http_requests_total counter
http_requests_total{request_path="/healthcheck",status="200"} 3
http_requests_total{request_path="/healthcheck"} 3
http_requests_total 24
http_requests_total{request_path="/ping",status="200"} 21
http_requests_total{request_path="/ping"} 21

# HELP process_cpu_usage_percentage The CPU percentage used.
# TYPE process_cpu_usage_percentage gauge
process_cpu_usage_percentage 0

# HELP process_uptime_seconds How much time the process has been running in seconds.
# TYPE process_uptime_seconds gauge
process_uptime_seconds 27049

# HELP process_disk_total_written_bytes The total bytes written to disk.
# TYPE process_disk_total_written_bytes gauge
process_disk_total_written_bytes 208896

# HELP process_disk_read_bytes The bytes read from disk.
# TYPE process_disk_read_bytes gauge
process_disk_read_bytes 53641216

# HELP process_disk_total_read_bytes Total bytes Read from disk.
# TYPE process_disk_total_read_bytes gauge
process_disk_total_read_bytes 53641216

# HELP process_disk_written_bytes The bytes written to disk.
# TYPE process_disk_written_bytes gauge
process_disk_written_bytes 208896

# HELP process_virtual_memory_bytes The virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 421253152768

# HELP process_memory_bytes Memory size in bytes.
# TYPE process_memory_bytes gauge
process_memory_bytes 15319040

# TYPE http_request_duration_seconds histogram
http_request_duration_seconds_bucket{request_path="/healthcheck",le="0.005"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="0.01"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="0.025"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="0.05"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="0.1"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="0.25"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="0.5"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="1"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="2.5"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="5"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="10"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",le="+Inf"} 3
http_request_duration_seconds_sum{request_path="/healthcheck"} 0.001630958
http_request_duration_seconds_count{request_path="/healthcheck"} 3
http_request_duration_seconds_bucket{request_path="/ping",le="0.005"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="0.01"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="0.025"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="0.05"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="0.1"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="0.25"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="0.5"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="1"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="2.5"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="5"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="10"} 21
http_request_duration_seconds_bucket{request_path="/ping",le="+Inf"} 21
http_request_duration_seconds_sum{request_path="/ping"} 0.013996084
http_request_duration_seconds_count{request_path="/ping"} 21
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="0.005"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="0.01"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="0.025"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="0.05"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="0.1"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="0.25"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="0.5"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="1"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="2.5"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="5"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="10"} 3
http_request_duration_seconds_bucket{request_path="/healthcheck",status="200",le="+Inf"} 3
http_request_duration_seconds_sum{request_path="/healthcheck",status="200"} 0.001630958
http_request_duration_seconds_count{request_path="/healthcheck",status="200"} 3
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="0.005"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="0.01"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="0.025"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="0.05"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="0.1"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="0.25"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="0.5"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="1"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="2.5"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="5"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="10"} 21
http_request_duration_seconds_bucket{request_path="/ping",status="200",le="+Inf"} 21
http_request_duration_seconds_sum{request_path="/ping",status="200"} 0.013996084
http_request_duration_seconds_count{request_path="/ping",status="200"} 21
http_request_duration_seconds_bucket{le="0.005"} 24
http_request_duration_seconds_bucket{le="0.01"} 24
http_request_duration_seconds_bucket{le="0.025"} 24
http_request_duration_seconds_bucket{le="0.05"} 24
http_request_duration_seconds_bucket{le="0.1"} 24
http_request_duration_seconds_bucket{le="0.25"} 24
http_request_duration_seconds_bucket{le="0.5"} 24
http_request_duration_seconds_bucket{le="1"} 24
http_request_duration_seconds_bucket{le="2.5"} 24
http_request_duration_seconds_bucket{le="5"} 24
http_request_duration_seconds_bucket{le="10"} 24
http_request_duration_seconds_bucket{le="+Inf"} 24
http_request_duration_seconds_sum 0.015627042
http_request_duration_seconds_count 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants